Fix GtkTooltip destroy the custom widget
authorLin Ma <lin.ma@sun.com>
Mon, 25 May 2009 02:01:04 +0000 (10:01 +0800)
committerLin Ma <lin.ma@sun.com>
Mon, 25 May 2009 02:01:04 +0000 (10:01 +0800)
Fixed 576091, Custom_widget does not get destroyed when the tooltip
goes away. Add a release note for this fix.

README.in
gtk/gtktooltip.c

index 6d81355472ad2a261eec2a6ff9c0a2c123c31d42..3e2d7da72762ad462c31058c461f70c2765988e9 100644 (file)
--- a/README.in
+++ b/README.in
@@ -27,6 +27,14 @@ Installation
 See the file 'INSTALL'
 
 
+Release notes for 2.18
+======================
+
+* gtk_tooltip_set_custom now accept a NULL custom_widget to unset the
+  old custom_widget. Custom_widget does not get destroyed when the
+  tooltip goes away.
+
+
 Release notes for 2.16
 ======================
 
index af733b7a65e460bb0924c415059960f7229f2497..77e47772cd3b3c9dedd347735b59ee514319c0a6 100644 (file)
@@ -182,6 +182,7 @@ gtk_tooltip_finalize (GObject *object)
       tooltip->browse_mode_timeout_id = 0;
     }
 
+  gtk_tooltip_set_custom (tooltip, NULL);
   gtk_tooltip_set_last_window (tooltip, NULL);
 
   if (tooltip->window)
@@ -333,12 +334,15 @@ gtk_tooltip_set_icon_from_icon_name(GtkTooltip  *tooltip,
 /**
  * gtk_tooltip_set_custom:
  * @tooltip: a #GtkTooltip
- * @custom_widget: a #GtkWidget
+ * @custom_widget: a #GtkWidget, or %NULL to unset the old custom widget.
  *
- * Replaces the widget packed into the tooltip with @custom_widget.  
+ * Replaces the widget packed into the tooltip with
+ * @custom_widget. @custom_widget does not get destroyed when the tooltip goes
+ * away.
  * By default a box with a #GtkImage and #GtkLabel is embedded in 
  * the tooltip, which can be configured using gtk_tooltip_set_markup() 
  * and gtk_tooltip_set_icon().
+
  *
  * Since: 2.12
  */